TCPNetwork

Undocumented in source.

Constructors

this
this()
Undocumented in source.

Members

Functions

attemptReconnection
void attemptReconnection()
Undocumented in source. Be warned that the author may not have intended to support it.
connect
NetConnectStatus connect(NetIPAddress ip, void delegate() onConnect, uint id)
Undocumented in source. Be warned that the author may not have intended to support it.
disconnect
void disconnect()
Undocumented in source. Be warned that the author may not have intended to support it.
getConnectionSelfID
uint getConnectionSelfID()
Undocumented in source. Be warned that the author may not have intended to support it.
getData
size_t getData(ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
getEventCount
ptrdiff_t getEventCount()
Undocumented in source. Be warned that the author may not have intended to support it.
getSocketToSendData
Socket getSocketToSendData()
Undocumented in source. Be warned that the author may not have intended to support it.
host
NetConnectStatus host(NetIPAddress ip)
Undocumented in source. Be warned that the author may not have intended to support it.
isHost
bool isHost()
Undocumented in source. Be warned that the author may not have intended to support it.
sendData
bool sendData(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
setStatus
NetConnectStatus setStatus(NetConnectStatus stat)
Undocumented in source. Be warned that the author may not have intended to support it.
status
NetConnectStatus status()
Undocumented in source. Be warned that the author may not have intended to support it.
targetConnectionID
void targetConnectionID(uint ID)
Undocumented in source. Be warned that the author may not have intended to support it.
targetConnectionID
uint targetConnectionID()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_status
NetConnectStatus _status;
Undocumented in source.
accumulatedData
ubyte[] accumulatedData;

It is useful to send some messages right after connecting the socket. The problem is that sometimes, this data can't be sent. To solve that issue, this data is accumulated, and thus, is sent in either getData or sendData, the one which is called first. After that, accumulated data becomes unused.

client
Socket client;
Undocumented in source.
connectSocket
Socket connectSocket;
Undocumented in source.
connectedSockets
int connectedSockets;
errSet
SocketSet errSet;
Undocumented in source.
hostSocket
Socket hostSocket;
Undocumented in source.
onConnect
void delegate() onConnect;
Undocumented in source.
readSet
SocketSet readSet;
writeSet
SocketSet writeSet;
Undocumented in source.

Inherited Members

From INetworkBackend

connect
NetConnectStatus connect(NetIPAddress ip, void delegate() onConnect, uint id)
attemptReconnection
void attemptReconnection()

Tries to reconnect to the same address on initial connect.

getConnectionSelfID
uint getConnectionSelfID()

Gets ID for that network connection. It can't change over its lifetime

targetConnectionID
uint targetConnectionID()

Gets ID for the currently target network connection. Changed with the setter

targetConnectionID
void targetConnectionID(uint id)

Sets that network connection connected to the specified ID

isHost
bool isHost()
Undocumented in source.
sendData
bool sendData(ubyte[] data)

Sends the data by using a header

disconnect
void disconnect()
Undocumented in source.
getData
size_t getData(ubyte[] tempBuffer)
Undocumented in source.
status
NetConnectStatus status()
Undocumented in source.

Meta